<template>
	<view>
		<view v-if="!isBlack">
			<van-nav-bar :title="title" left-text="返回" left-arrow @click=" goBack" />
		</view>
		<view v-else>
			<van-nav-bar :title="title" />
		</view>
	</view>
</template>
<script>
	export default {
		name: "navbar",
		props: {
			title: {
				type: String,
				default: "标题"
			},
			isBlack: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {}
		},
		methods: {
			goBack() {
				uni.navigateBack()
			}
		},
	}
</script>
